import axios from '@/utils/request';

// 获取文本验证码
const GetKaptchaImage = params => {
  return axios.get('/kaptcha/v2/getKaptchaImage', {
    params
  });
};

// 验证码-登录
const sendRegisterVerifyCode = data => {
  return axios.post('/sms/v2/sendRegisterVerifyCode', data);
};

// 校验手机号码是否已注册
const checkMobile = data => {
  return axios.post('/auth/checkMobile', data);
};

// 手机号登录
const loginMobile = data => {
  return axios.post('/auth/v2/v2/loginMobile', data);
};

// 退出登录
const logout = data => {
  return axios.post('/auth/v2/logout', data);
};

export { GetKaptchaImage, sendRegisterVerifyCode, checkMobile, loginMobile, logout };
